﻿@** Copyright 2013 Seven Spikes Ltd. All rights reserved. (http://www.nop-templates.com)
* http://www.nop-templates.com/t/licensinginfo
*@

@model SevenSpikes.Nop.AjaxFilters.Models.ProductsModel
@using Nop.Web.Models.Catalog;
@using Nop.Web.Extensions;
@using SevenSpikes.Nop.Framework.MVCExtensions;

<div id="nopAjaxFiltersNoProductsDialog" title="@T("SevenSpikes.NopAjaxFilters.Client.Common.NoResultsFoundTitle")">
    <p>@T("SevenSpikes.NopAjaxFilters.Client.Common.NoResultsFoundMessage")</p>
</div>

@if (Model.Products.Any())
{
    if (Model.ViewMode == "list")
    {
@*list mode*@
    <div class="@Model.NopAjaxFiltersSettingsModel.ProductsListPanelSelector.TrimStart(new[] { '.' })">
        <div class="item-grid">
            @foreach (var product in Model.Products)
            {
                <div class="item-box">
                    @Html.Partial("_ProductBox", product)
                </div>
            }
        </div>
    </div>       
    }
    else
    {
@*grid mode*@
    <div class="@Model.NopAjaxFiltersSettingsModel.ProductsGridPanelSelector.TrimStart(new[] { '.' })">
        @(Html.DataList7Spikes<ProductOverviewModel>(Model.Products, 3,
                    @<div class="item-box">
                        @Html.Partial("_ProductBox", @item)
                    </div>
            ))
    </div>
    }
}
<div class="@Model.NopAjaxFiltersSettingsModel.PagerPanelSelector.TrimStart(new[] { '.' })">
    @if (Model.PagingFilteringContext.TotalPages > 1)
    {
        <div>
            @Html.Pager(Model.PagingFilteringContext).QueryParam("pagenumber")
        </div>
        <div class="corner"></div>
    }
</div>
@Html.Hidden("specificationFilterModel7SpikesJson", Model.SpecificationFilterModel7SpikesJson);
@Html.Hidden("attributeFilterModel7SpikesJson", Model.AttributeFilterModel7SpikesJson);
@Html.Hidden("manufacturerFilterModel7SpikesJson", Model.ManufacturerFilterModel7SpikesJson);

@Html.Hidden("urlHashQuery", Model.HashQuery)
@Html.Hidden("currentPageSizeJson", Model.CurrentPageSizeJson)
@Html.Hidden("currentViewModeJson", Model.CurrentViewModeJson)
@Html.Hidden("currentOrderByJson", Model.CurrentOrderByJson)
@Html.Hidden("currentPageNumberJson", Model.CurrentPageNumberJson)
@Html.Hidden("priceRangeFromJson", Model.PriceRangeFromJson)
@Html.Hidden("priceRangeToJson", Model.PriceRangeToJson)